package org.holynite.fieldmanage.ejbs

import org.holynite.fieldmanage.Utils.ManagementException
import org.holynite.fieldmanage.entities.Administrator

import javax.ejb.Remote

/**
 * Created by midnite on 15/1/9.
 */
@Remote
interface AdministratorManagement {
	void addAdministrator(Administrator newAdmin) throws ManagementException
	void saveAdministrator(Administrator admin) throws ManagementException
	void removeAdministrator(Object key) throws ManagementException
	int checkAdministratorAmount()
	int checkAvaliableAdministratorAmout()
	Boolean checkWorkIdUsable(String workId)
	Administrator checkLogin(String adminWorkId, String password) throws ManagementException
	Administrator checkDefaultLogin(String adminWorkId, String password) throws ManagementException
	Boolean checkPassword(Administrator admin, String password) throws ManagementException
	Boolean isDefaultAdministrator(Administrator admin)
	void changePassword(Administrator admin) throws ManagementException
	List<Administrator> listAdministrators(String keyword)
}
